package com.hnichr.ump.common.plan.vo;

import com.hnichr.ump.common.plan.Auth;
import lombok.Data;

import java.io.Serializable;

@Data
public class PlanAuthVo implements Serializable {
    private static final long serialVersionUID = -1L;

    private Auth view;

    private Auth edit;

    public PlanAuthVo(){
        super();
    }

    public PlanAuthVo(Auth view,Auth edit){
        this.view = view;
        this.edit = edit;
    }

    public static PlanAuthVo getNoAuth(){
        return new PlanAuthVo(Auth.NONE,Auth.NONE);
    }

    public static PlanAuthVo getCompanyLeader(){
        return new PlanAuthVo(Auth.ALL,Auth.NONE);
    }

    public static PlanAuthVo getPlanAdmin(){
        return new PlanAuthVo(Auth.ALL,Auth.ALL);
    }

    public static PlanAuthVo getDeptLeader(){
        return new PlanAuthVo(Auth.ALL,Auth.DEPT);
    }

    public static PlanAuthVo getStaff(){
        return new PlanAuthVo(Auth.DEPT,Auth.DEPT);
    }
}
